<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
</head>
<body>

<div th:fragment="headname">
    <div class="fly-header layui-bg-black">
        <div class="layui-container">
            <ul class="layui-nav fly-nav layui-hide-xs">
                <li class="layui-nav-item layui-this">
                    <a href="/index"><i class="fa fa-university" aria-hidden="true" style="color: white; margin-top: 14px"></i>首页</a>
                </li>
                <li class="layui-nav-item layui-this">
                    <a href="/course/allcourse" ><i class="fa fa-bookmark" aria-hidden="true" style="color: white; margin-top: 14px"></i>课程</a>
                </li>
<!--                <li class="layui-nav-item layui-this">-->
<!--                    <a href="javascript:;"><i class="fa fa-search" aria-hidden="true" style="color: white; margin-top: 14px"></i>搜索</a>-->
<!--                </li>-->
                <li class="layui-nav-item layui-this">
                    <a href="/comment/discuss"><i class="fa fa-commenting-o" aria-hidden="true" style="color: white; margin-top: 14px"></i>讨论</a>
                </li>
                <li class="layui-nav-item layui-this">
                    <a href="/course/allfiledata"><i class="fa fa-book" aria-hidden="true" style="color: white; margin-top: 14px"></i>资料</a>
                </li>
            </ul>
            <ul class="layui-nav fly-nav-user">
                <li class="layui-nav-item" th:if="${session.userLogin} eq null">
                    <a href="/toLogin">登入</a>
                </li>
                <li class="layui-nav-item" th:if="${session.userLogin} eq null">
                    <a href="/register">注册</a>
                </li>
                <li class="layui-nav-item" th:if="${session.userLogin}?true:false">
                    <a class="fly-nav-avatar" href="javascript:;">
                        <cite class="layui-hide-xs">[[${session.userLogin.userName}]]</cite>
                        <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" th:src="${session.userLogin.avatar}">
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="javacript:;">用户中心</a></dd>
                        <dd><a href="javacript:;">我的订单</a></dd>
                        <dd><a href="javacript:;">我的发布</a></dd>
                        <dd><a href="javacript:;">通知信息</a></dd>
                        <hr style="margin: 5px 0;">
                        <dd><a href="/logout" style="text-align: center;">退出</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
</div>
</body>
</html>
